﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

/// <summary>
/// Summary description for RadioButtonHandler
/// </summary>
public class RadioButtonHandler
{

    //Khởi tạo và đưa các radioButton đã check vào một list
    List<RadioButton> _radioList;
	public RadioButtonHandler(List<RadioButton> _radioList)
	{
        this._radioList = _radioList;
        getCheckedRadioButton();
	}

    public void getCheckedRadioButton()
    {
        Variables.checkedRadioButtonList = new List<RadioButton>();
        foreach (var radio in _radioList)
        {
            if (radio.Checked)
            {
                Variables.checkedRadioButtonList.Add(radio);
            }
        }
    }
}